package simple_factory

import "project/design/factory/products"

type MouseType int

const (
	DellMouse MouseType = 1
	HpMouse   MouseType = 2
)

/**
* @date       : 2020/10/6
* @description: 这个是普通的简单工厂，多方法工厂就是提供多个工厂方法，每个工厂对应一个产品
* @params     :
* @returns    :
**/
func SimpleMouseFactory(mouseType MouseType) *products.Mouse {
	var mouse products.Mouse
	switch mouseType {
	case DellMouse:
		mouse = new(products.DellMouse)
	case HpMouse:
		mouse = new(products.HpMouse)
	}
	return &mouse
}
